package org.example.service.impl;

import org.example.mapper.CompanymessageMapper;
import org.example.pojo.Companymessage;
import org.example.pojo.Resume;
import org.example.service.CompanymessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompanymessageServiceImpl implements CompanymessageService {

    @Autowired
    private CompanymessageMapper companymessageMapper;

    @Override
    public void insertCompanyMessage(Integer companyId, Integer jobId, Integer userId, Integer resumeId) {
        companymessageMapper.insertCompanyMessage(companyId, jobId, userId, resumeId);
    }

    @Override
    public List<Companymessage> getResumeListByJobId(Integer jobId, Integer companyId) {
        return companymessageMapper.getResumeListByJobId(jobId, companyId);
    }

    @Override
    public void updateInviteStatus(Integer jobId, Integer companyId, Integer resumeId, Integer approve) {
        companymessageMapper.updateInviteStatus(jobId, companyId, resumeId, approve);
    }

    @Override
    public Companymessage selectStatus(Integer userId, Integer jobId, Integer companyId) {
        return companymessageMapper.selectStatus(userId, jobId, companyId);
    }

    @Override
    public void insertCompanyApproveMessage(Integer userId, Integer companyId, Integer jobId, Integer resumeId) {
        companymessageMapper.insertCompanyApproveMessage(userId, companyId, jobId, resumeId);
    }
}
